/**
 * 
 */
package com.atkinsglobal.basic;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * @author burg2666
 *
 */
public class CtxAware implements ApplicationContextAware {

	private ApplicationContext ctx;
	
	
	public Person getMeSomeone(){
		return ctx.getBean("John", Person.class);
		
	}
	
	/* (non-Javadoc)
	 * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
	 */
	@Override
	public void setApplicationContext(ApplicationContext arg0)
			throws BeansException {
		this.ctx = arg0;

	}

}
